//
//  NSDateComponents+Extend.m
//  RMMaterialRed
//
//  Created by XBWH on 2024/3/8.
//

#import "NSDateComponents+Extend.h"

@implementation NSDateComponents (Extend)
+(NSDateComponents *)rb_dateComponentsFromDate:(NSDate *)date{
    NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalendarUnitYear| NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitWeekOfYear |  NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond | NSCalendarUnitWeekday | NSCalendarUnitWeekdayOrdinal fromDate:date];
    return components;
}
@end
